{extend name="web/public/base" /}
{block name="header"}
{/block}
{block name="main"}
<section class="scrollable padder">
    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <li><a><i class="fa fa-home"></i> 首页</a></li>
        <li class="active">购物商城</li>
        <li class="active">{$title}</li>
    </ul>
    <div class="row">
        <div class="col-sm-12">
            <section class="panel panel-default">
                <header class="panel-heading font-bold">{$title}</header>
                <div class="panel-body">
                    <form id="ajaxform" action="{:url('send')}" method="post" onsubmit="return false;">
                        <div class="row col-md-12">
                            <div class="form-group col-sm-6">
                                <label>快递公司</label>
                                <input type="text" id="tool" name="tool" class="form-control" placeholder="中通快递">
                            </div>
                            <div class="form-group col-sm-6">
                                <label>快递单号</label>
                                <input type="text" id="toolid" name="toolid" class="form-control" placeholder="快递单号">
                            </div>
                        </div>
                        <div class="row col-md-12">
                            <div class="form-group col-sm-6">
                                <label>发货人</label>
                                <input type="text" id="send_name" name="send_name" class="form-control" placeholder="慧宝园">
                            </div>
                            <div class="form-group col-sm-6">
                                <label>发货人联系方式</label>
                                <input type="text" id="send_contact" name="send_contact" class="form-control" placeholder="18854214128">
                            </div>
                        </div>

                        <div class="row col-lg-12">
                            <div class="form-group col-sm-6">
                                <label>发货地址</label>
                                <input type="text" id="send_address" name="send_address" class="form-control"
                                       placeholder="山东省青岛市城阳区大周村工业园">
                            </div>
                        </div>
                        <footer class="panel-footer text-right bg-light lter col-sm-12">
                            <input type="hidden" name="id" value="{$list['id']}">
                            <button type="submit" class="btn btn-success btn-s-xs">提 交</button>
                        </footer>
                    </form>
                </div>
            </section>
        </div>

    </div>
</section>
{/block}
{block name="script"}
<script>
    $(function () {
        $.validator.setDefaults({
            submitHandler: function () {
                ajaxSubmit();
            },
            highlight: function (element, errorClass) {
                $(element).css('border', '2px solid red');
            },
            unhighlight: function (element, errorClass) {
                $(element).css('border', '1px solid green');
            }
        });

        jQuery.validator.addMethod("isMobile", function (value, element) {
            var length = value.length;
            var mobile = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(16[0-9]{1})|(17[0-9]{1})|(18[0-9]{1})|(19[0-9]{1}))+\d{8})$/;
            return this.optional(element) || (length == 11 && mobile.test(value));
        }, "请正确填写您的手机号码");

        $.validator.addMethod("checkPwd", function (value, element, params) {
            var checkPwd = /^\w{6,16}$/g;
            return this.optional(element) || (checkPwd.test(value));
        }, "*只允许6-16位英文字母、数字或者下画线！");

        $('#ajaxform').validate({

        });
    })

</script>
{/block}
